package com.example.leetcode.backtrace;

import com.example.leetcode.backtrace.common.BackTraceUtils;

import java.util.List;

class Solution40 {
    public List<List<Integer>> combinationSum2(int[] candidates, int target) {
        return BackTraceUtils.combinationSum2(candidates, target);
    }
}

public class leetcode40 {
    public static void main(String[] args) {
        Solution40 solution40 = new Solution40();
        int[] nums = {10, 1, 2, 7, 6, 1, 5};
        int[] nums2 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
        int[] nums3 = {2, 5, 2, 1, 2};
        int[] nums4 = {4, 4, 2, 1, 4, 2, 2, 1, 3};
        int[] nums5 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};

        System.out.println(solution40.combinationSum2(nums, 8).toString());
        System.out.println(solution40.combinationSum2(nums2, 27).toString());
        System.out.println(solution40.combinationSum2(nums3, 5).toString());
        System.out.println(solution40.combinationSum2(nums4, 6).toString());
        System.out.println(solution40.combinationSum2(nums5, 30).toString());
    }
}
